home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93b.txt / 000103_icon-group-sender _Fri May 14 16:29:56 1993.msg < prev    next >
Internet Message Format  |  1993-06-16  |  2KB

  1. Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Tue, 18 May 1993 09:47:18 MST
  2. Received: by owl.cs.arizona.edu; Tue, 18 May 1993 09:47:17 MST
  3. Date: 14 May 93 16:29:56 GMT
  4. From: amethyst!organpipe.uug.arizona.edu!news@arizona.edu  (Dave Schaumann)
  5. Organization: University of Arizona
  6. Subject: Re: Icon vs Prolog, docs, availability ?
  7. Message-Id: <1993May14.162956.25963@organpipe.uug.arizona.edu>
  8. References: <borbor-130593120939@129.194.82.105>, <1993May14.020130.17872@organpipe.uug.arizona.edu>, <1993May14.044937.12543@midway.uchicago.edu>
  9. Sender: icon-group-request@cs.arizona.edu
  10. To: icon-group@cs.arizona.edu
  11. Status: R
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13.  
  14. In article <1993May14.044937.12543@midway.uchicago.edu>, goer@ellis (Richard L. Goerwitz) writes:
  15. >dave@cs.arizona.edu (Dave Schaumann) writes:
  16. >
  17. >>  Select a in (size of list) and i in L[a].  The loop terminates when
  18. >>  L[a] is empty for all a.
  19. >>
  20. >>This can be expressed very nicely in Icon as
  21. >>
  22. >>  while a := 1 to *L & i := !L[a] do {
  23. >>    # do the loop stuff
  24. >>    }
  25. >
  26. >I might tend to write the loop stuff as applying to every !!L,
  27. >which produces every element of every element of L, unless the
  28. >code involved actual shortening of L and/or L's elements.
  29.  
  30. Actually, the loop *has* to shorten L (since I'm using while and
  31. not every).  I could change to every and use your method, except
  32. that the contents of L changes during each iteration.
  33.  
  34. It's also important to the algorithm to know which list "i" is
  35. taken from (ie, it needs to have the value of "a")
  36.  
  37. -- 
  38. Dave Schaumann            dave@cs.arizona.edu
  39.